Will Durant answers this question beautifully in his book series, The Story of Civilisation. However, this series is extremely long and focuses primarily on what happened. So I'm going to pull out the why's since that's the part that helps us predict the future.
Humanity faded into existence where the sub saharan jungle fades into grassland, some monkeys started venturing out from the jungle into the grassland. Taking advantage of their upright stance to see over the grass they learned that many animals lack the endurance to run for very long. Quadrupeds are forced to breath at the rate of their strides while human lungs are unaffected by the motion of their legs allowing them to breath at a higher frequency than their stride. So they ran their prey until their speed was limited by the cardiovascular system, always inferior to out own. Then overtook them. This advantage increased as evolution reduced fur and added sweating to improve temperature regulation. Add to this our primitive communication ability which enables us to plan a relay race for our unwitting pray and these monkeys came to dominate the grassland. Not yet Homo sapiens. Homo erectus migrated out of Africa in search of more pray and conquered the whole continent. When these new lands filled, erectus had to compete with a new opponent. Itself. Or at least species derived from itself. This was Neanderthal, Denisovans, and Sapiens. Denisovans evolved in Asia and Neanderthals in Europe, while Sapiens emerged right in the middle.
The winner of this competition was obviously us and we flatter ourselves by imagining it’s because we are smarter. But our brains were actually smaller than the Neanderthal. Our trick was that we evolved a polymorphic brain. 19/20 sapiens come out of the womb and imitate those around us religiously. We don’t ask why we just do. It’s been shown by experiment that modern chimps are more thoughtful than modern humans. But counter intuitively that is why we are so much smarter. When we started copying our parents it enabled culture. And what’s special about culture is that it evolves simultaneously through natural and synthetic selection. Which speeds up the evolution process. With the 1/20's serving the same role that random mutation serves in natural selection.
The 1/20 humans don’t copy quite so religously. They question things and try out new things and will therefore be known henceforth as morons. They play the role that sex plays in natural selection. They add variation into the culture and when they occassion a success the rest of the tribe would patch their software with the new update. This enabled a faster rate of evolution than biology alone because it had a higher rate of transmission. Having sex with a fire making monkey doesn’t necessarily mean your kids will be able to make fire because only one parent has the mutation. Culture also enables multiple mutations within one generation. Having sex with the fire making monkey and the rock sharpening monkey will at best give your kids one of those abilities but more likely neither. While cultural evolution enables both you and your kids to gain both abilities. It’s important to note here that nowhere here have we become smarter per se. The role of the 1/20 was not to be the smart member or the tribe. They were invariably morons. Their role was simply to explore the possibility space. No more. Thinking was something that one lucky idiot invented much later and learning to think is what transforms the curious idiot into at least a demigenius.
With the trick of cultural evolution humans quickly became more powerful than any other animal on the planet including bigger brained relatives like the Neanderthals. So we conquired their hunting ranges and even began to expand our hunting ranges onto the ocean and into colder climates. At this point it might be helpful to stop and take a look at what life was like for these early creatures of culture that lack any culture. They live in paternal tribes of up to 100 people. Men purchase women from other tribes by working for them and thereby aquire enough genetic variation to keep the tribes gene pool healthy. This trade in women gave tribes a reason to get along but when relationships broke down the result would be genocide of one or the other tribe. Captives if women would be assimilated. Giving rise to the high agreeableness we see in women today. And if men they would be eaten both for the nutrition and for the symbolism. This genocidal possibility meant that tribes evolved as singular organism. Private property was irrelevant partly because there wasn’t much property to speak of but more importantly because jelousy over property would weaken the tribe and make it easy pray for another tribe that didn’t spend energy on internal conflicts. As such these tribes were communistic and shared everything including women to the point that their children rarely knew who their father was. Polyamourous people today are a throwback to this time period.
To early people just learning to manipulate nature it’s only a small step for them to explain larger natural phenomenon as the result of larger people. So early religion was essentially anthropomorphising nature. They explained the lack of direct evidence for these people by hiding them behind clouds or underground. They nevertheless were people in the minds of early people and as such could be traded with. Giving rise to one of the more unfortunate universals of human culture, human sacrific. They believed that by trading the most valuable thing they possessed, human life, they could gain favor from the big people. Captured men now had the additional value as a trade good. Later this value as a good would skyrocket as people found a use for people. But that would have to wait untill demand for low skill labour was created along side with the invention of agriculture.
But trading with the gods didn’t really work so our pre-thought morons started experimenting with ways of trading with gods more effectivly. This lead them to the idea of building a place of exchange. Since the gods might simply not know where to collect their sacrifice from. This still didn’t work so our morons started building calenders into these places of trade so that the gods could learn the time and place to trade with us. By now the masses were trying so hard to copy the morons exactly that they didn’t really notice that trading with the gods still wasn’t working. But they were just happy to be there. The ritual became it’s own reward and nobody minded that the gods only held up their end of the bargain randomly.
It developed a rich set of stories but people found it hard to believe they were real when their supposed powers were not reliably manipulated by their sacrifices and greek satirists mocked them while greek philosophers provided alternative explanations for natural phenomena.
Greek mystery cults developed the idea of an afterlife and combined with the mythology of Dionysus to create the popular religion of christianity which combined a likeable god with the clever trick of hiding his false promises in the afterlife.
Cynicism grew out the ground cleared by the satirists. It was an anti-civilisation philosophy. The very work means dog-like. And while the its abstract ideas had wide appeal only hardcore philosopher types like Diogenes implemented the ideas. This was enough him one of the most famous people in greece though.